Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Adding subscription-manager InitContainer #721

Closed
wants to merge 1 commit into from

Conversation

fao89
Copy link
Collaborator

@fao89 fao89 commented Feb 29, 2024

Provide a way to execute subscription-manager register without exposing the password at edpm_bootstrap_command

Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fao89

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fao89
Copy link
Collaborator Author

fao89 commented Feb 29, 2024

/test all

@fao89
Copy link
Collaborator Author

fao89 commented Feb 29, 2024

/test all

Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

@fao89: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/dataplane-operator-build-deploy-kuttl 60095ee link true /test dataplane-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://review.rdoproject.org/zuul/buildset/f9e0f311fbd74adab9da34ddf33139ad

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 30m 45s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 07m 39s
cifmw-crc-podified-edpm-baremetal FAILURE in 26m 26s
✔️ dataplane-operator-docs-preview SUCCESS in 3m 07s

Copy link
Collaborator

@slagle slagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use a similar design as you've done here, but do it generically. We should avoid hard coding the special handling for the bootstrap service, and the subscription-manager command, etc.

I have 2 ideas how this might work:

  1. Add a secret field on the NodeSet, where we set env vars in the ansibleEE based off of every key in that secret. This is very similar to what you've done here, but make it generic. Any ansible content could then consume those secret values from the env vars.

  2. Add a secret to the secrets list on the bootstrap service. Modify the edpm_bootstrap ansible to read the the secret values when they're mounted into the pod. Make the secret key/values available as host vars with set_fact. Any command in edpm_bootstrap_command could then make use of those vars.

Both approaches require the user to know ahead of time the name of the keys they intend to consume with edpm_bootstrap_command. For instance, I'd need to know to create a secret that has data.username so that I can use {{ username }} (or whatever we call the env var) in edpm_boostrap_command. I think this is reasonable as there could be any secret data that could be passed in that we don't have to keep adding support for (org_id or activation key as an example).

@fao89
Copy link
Collaborator Author

fao89 commented Feb 29, 2024

I'll try implement 1

@fao89 fao89 closed this Feb 29, 2024
@fao89
Copy link
Collaborator Author

fao89 commented Feb 29, 2024

I've started this: #723

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants